import { IsNotEmpty, IsOptional, IsString, Length } from 'class-validator';
export class CreateUserDto {
  @IsString()
  @IsNotEmpty()
  @Length(6, 20, {
    message: '用户名最小长度为$constraint1和$constraint2之间,',
  })
  username: string;

  @IsString()
  @IsNotEmpty()
  @Length(6, 20)
  password: string;

  role: string[];
}
